<!DOCTYPE html>
<html lang="zh-CN">

<!-- fault 故障详情页面 -->

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="stylesheet" href="./css/font-awesome.min.css">
    <link rel="stylesheet" href="./css/iview/iview.css">
    <link rel="stylesheet" href="./css/notiflix-3.2.5.min.css">
    <script src="./js/notiflix-3.2.5.min.js" type="text/javascript"></script>

    <script src="./js/jquery-3.6.0.min.js"></script>
    <script src="./js/vue.min.js"></script>
    <script src="./js/iview.min.js"></script>
    <script src="./js/layer/layer.js"></script>
    <script src="./js/gojs/go.js"></script>
    <script src="./js/gojs/fault/faultProcess.js"></script>
    <script src="./config.js" type="text/javascript"></script>
    <script src="./js/element-ui/index.js"></script>
    <link rel="stylesheet" href="./js/element-ui/index.css">
    <script src="./js/nept-websocket.js" type="text/javascript"></script>

    <title>斗轮机无人值守系统-南环科技</title>

    <style>
        .bg-color {
            background-color: #D3D3D3;
        }

        button {
            background-color: orange;
            border-radius: 5px;
            width: 130px;
            height: 39px;
            line-height: 18px;
            font-size: 18px;
            color: #FFF;
            cursor: pointer;
            /* box-shadow: 3px 3px 2px black; */
            font-weight: bolder;
        }
        .el-table .red {
            background-color: #efc9c9;
        }

        .el-table .green {
            background-color: #caf5ca;
        }

        .el-table--enable-row-hover .el-table__body tr:hover>td {
            background-color: rgba(0, 0, 0, 0) !important;
        }
        .el-picker-panel__icon-btn {
            width: 20px;
            height: 20px;
        }
    </style>
</head>

<body style="margin:0px; padding:0px;">
    <div id="app">
        <el-tabs value="name1">
            <el-tab-pane label="故障详情" name="name1" style="overflow:hidden;overflow-x:auto;">
                <div class="bg-color" style="float: left; height: 770px; width: 1600px;margin-right: 5px;">
                    <el-button style="font-size:18px;background-color: green;margin-left: 15px;color: white;"
                    onclick="OnClickDK('ERR_RESET','故障复位')">故障复位</el-button>
                    <!-- GOJS -->
                    <div id="myDiagramDivErrMsg" style="width:100%; height:98%;"></div>
                </div>
            </el-tab-pane>
            <!-- <el-tab-pane label="故障列表" name="second">
                <div style="margin-left: 18px;width: 97%;float: left;">
                    <div style="float: left;margin-left: 10px;">
                        <div class="block">
                            <el-date-picker v-model="timeVal" type="daterange" range-separator="~"
                                start-placeholder="开始日期" end-placeholder="结束日期" unlink-panels value-format="yyyy-MM-dd">
                            </el-date-picker>
                        </div>
                    </div>
                    <div style="float:left; margin-left: 20px;">
                        <el-button type="primary" @click="qryList">查询</el-button>
                    </div>
                </div>
                <div style="margin: 18px;width: 97%;float: left;">
                    <el-table :data="tableData" stripe style="width: 100%" height="550">
                        <el-table-column prop="SHOW_MSG" label="故障详情" align="center">
                        </el-table-column>
                        <el-table-column prop="ADDTIME" label="出现时间" align="center" :formatter="formatTime">
                        </el-table-column>
                        <el-table-column prop="UPDATETIME" label="消除时间" align="center" :formatter="formatTime">
                        </el-table-column>
                        <el-table-column prop="TAGNAME" label="点名" align="center">
                        </el-table-column>
                    </el-table>

                    <div style="margin: 10px;overflow: hidden">
                        <div style="float: right;">
                            <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
                                :current-page="currentPage" :page-sizes="page_size_array" :page-size="pageSize"
                                background layout="prev, pager, next,total, sizes" :total="totals">
                            </el-pagination>
                        </div>
                    </div>
                </div>
            </el-tab-pane> -->
            <el-tab-pane label="事件顺序记录" name="third">
                <div style="margin-left: 18px;width: 97%;float: left;">
                    <div style="float: left;margin-left: 10px;">
                        <div class="block">
                            <el-date-picker v-model="timeVal" type="daterange" range-separator="~"
                                start-placeholder="开始日期" end-placeholder="结束日期" unlink-panels value-format="yyyy-MM-dd">
                            </el-date-picker>
                        </div>
                    </div>
                    <div style="float:left; margin-left: 20px;">
                        <el-button type="primary" @click="qrySOEList('',1)">查询</el-button>
                    </div>
                    <div style="float:left; margin-left: 20px;">
                        <el-button id="btn_real" type="warning" @click="qrySOEList('REAL',1)">查看实时</el-button>
                    </div>
                    <div style="float:left; margin-left: 20px;">
                        <el-button id="btn_his" type="success" @click="qrySOEList('HIS',1)">查看历史</el-button>
                    </div>
                </div>
                <div style="margin: 18px;width: 97%;float: left;">
                    <el-table :data="tableDataSoe" :row-class-name="tableRowClassName" style="width: 100%" height="550">
                        <el-table-column prop="SHOW_MSG" label="消息" align="center">
                        </el-table-column>
                        <el-table-column prop="ADDRESS" label="PLC地址" align="center"></el-table-column>
                        <el-table-column prop="ADDTIME" label="发生时间" align="center" :formatter="formatTime">
                        </el-table-column>
                        <el-table-column prop="UPDATETIME" label="结束时间" align="center" :formatter="formatTime">
                        </el-table-column>
                        <el-table-column prop="DURATION" label="报警持续时间(秒)" align="center"></el-table-column>
                        <el-table-column prop="RUN_MODE" label="控制方式" align="center">
                            <template slot-scope="scope">{{ scope.row.RUN_MODE === '0' ? '司机室' :(scope.row.RUN_MODE==='1'?'远程手动':(scope.row.RUN_MODE==='2'?'自动':'')) }}
                            </template>
                        </el-table-column>
                        <el-table-column prop="ALERT_LEVEL" label="报警等级" align="center">
                            <template slot-scope="scope">{{ scope.row.ALERT_LEVEL === 'F' ? '故障' :
                                (scope.row.ALERT_LEVEL===null?'':'LEVEL'+scope.row.ALERT_LEVEL) }}</template>
                        </el-table-column>
                        <el-table-column prop="ALERT_GROUP" label="报警组" align="center"></el-table-column>
                    </el-table>

                    <div style="margin: 10px;overflow: hidden">
                        <div style="float: right;">
                            <el-pagination @size-change="handleSizeChangeSoe" @current-change="handleCurrentChangeSoe"
                                :current-page="currentPageSoe" :page-sizes="page_size_array" :page-size="pageSizeSoe"
                                background layout="prev, pager, next,total, sizes" :total="totalSoes">
                            </el-pagination>
                        </div>
                    </div>
                </div>
            </el-tab-pane>
            <el-tab-pane label="图表监控" name="echarts">
                <iframe id="chartsIframe" align="center" src="./charts.html"
                 width="100%" height="800px" frameborder="no" border="0"
                    marginwidth="0" marginheight="0" scrolling="auto">
                </iframe>
            </el-tab-pane>
        </tabs>
    </div>

    <script>
        let faultWS = null;
        let errMsg = [];
        let arrRed = [];
        let bShowRed = false;
        let arrGOJSData = [];

        //========================IVIEW 开始========================
        let Main = {
            data() {
                return {
                    buttonSize: 'large',
                    tableColumns: [
                        {
                            title: '故障详情',
                            key: 'SHOW_MSG',
                            align: 'center'
                        },
                        {
                            title: '出现时间',
                            key: 'ADDTIME',
                            align: 'center'
                        },
                        {
                            title: '消除时间',
                            key: 'UPDATETIME',
                            align: 'center'
                        },
                        {
                            title: '点名',
                            key: 'TAGNAME',
                            align: 'center'
                        },
                        {
                            title: '数值',
                            key: 'DATA',
                            align: 'center'
                        },
                        {
                            title: '类别',
                            key: 'GROUPID',
                            align: 'center',
                            render: (h, params) => {
                                let data = "";
                                switch (params.row.GROUPID) {
                                    case "XB":
                                        data = "悬臂";
                                        break;
                                    case "XBPD":
                                        data = "悬臂皮带";
                                        break;
                                    case "DC":
                                        data = "大车";
                                        break;
                                    case "WC":
                                        data = "尾车";
                                        break;
                                    case "WCPD":
                                        data = "尾车皮带";
                                        break;
                                    case "DL":
                                        data = "斗轮";
                                        break;
                                }
                                return h('div', [
                                    h('span', {

                                    }, data),
                                ])
                            }
                        },
                    ],
                    tableData: [],
                    loading: false,
                    current: 1,
                    totals: 20, // 数据行数
                    page_size_array: [10, 20, 30, 40, 60, 100],
                    pageSize: 10, // 每页显示条数
                    pageIndex: 1,// 当前页
                    currentPage: 1,
                    timeVal: this.getTimes(),
                    dateStrat: "",
                    dateEnd: "",
                    deviceList: [
                        {
                            value: 'ALL',
                            label: '全部'
                        },
                        {
                            value: 'XB',
                            label: '悬臂'
                        },
                        {
                            value: 'XBPD',
                            label: '悬臂皮带'
                        },
                        {
                            value: 'DC',
                            label: '大车'
                        },
                        {
                            value: 'WC',
                            label: '尾车'
                        },
                        {
                            value: 'WCPD',
                            label: '尾车皮带'
                        },
                        {
                            value: 'DL',
                            label: '斗轮'
                        }
                    ],
                    deviceListSelect: 'ALL',
                    tableDataSoe: [],
                    currentPageSoe: 1,
                    totalSoes:0,
                    pageSizeSoe: 10
                }
            },

            methods: {
                tableRowClassName({ row }) {
                    if (row.ALERT_LEVEL === 'F') {
                        return 'red';
                    } else {
                        return 'green';
                    }
                },
                changePage(page) {
                    this.pageIndex = page;
                },

                changeDate(dateTime) {
                    this.dateStart = dateTime[0];
                    this.dateEnd = dateTime[1];
                },

                getTimes() {
                    let now = new Date();
                    let time1 = now.getFullYear() + "-" + ((now.getMonth() + 1) < 10 ? "0" : "") + (now.getMonth() + 1) + "-" + (now.getDate() < 10 ? "0" : "") + now.getDate();
                    let time2 = new Date(getNextDay(now));
                    time2 = time2.getFullYear() + "-" + ((time2.getMonth() + 1) < 10 ? "0" : "") + (time2.getMonth() + 1) + "-" + (time2.getDate() < 10 ? "0" : "") + time2.getDate();
                    return [time1, time2];
                },
                handleSizeChange(val) {
                    this.pageSize = val;
                    this.getList();
                },
                handleSizeChangeSoe(val) {
                    this.pageSizeSoe = val;
                    this.qrySOEList(g_qryType);
                },
                handleCurrentChange(val) {
                    this.currentPage = val;
                    this.getList();
                },
                handleCurrentChangeSoe(val) {
                    this.currentPageSoe = val;
                    this.qrySOEList(g_qryType);
                },
                qryList() {
                    this.currentPage = 1;
                    this.getList();
                },
                qrySOEList(qryType, pageIndex) {
                    g_qryType = qryType;
                    this.loading = true;
                    let request = {};
                    request.cmdType = "GET_SOE_LIST";
                    request.dateStart = this.timeVal[0];
                    request.dateEnd = this.timeVal[1];
                    request.faultType = 'E';
                    request.pageIndex = pageIndex ? pageIndex : this.currentPageSoe;
                    request.pageSize = this.pageSizeSoe;
                    request.qryType = qryType;
                    vueMain = this;
                    $.ajax({
                        url: g_CenterHttpUrl,
                        contentType: 'application/json',
                        data: JSON.stringify(request),
                        async: true,
                        type: "post",
                        dataType: "json",
                        success: function (rsp) {
                            if (rsp["resCode"] == g_ResCodeSuccess) {
                                vueMain.totalSoes = parseInt(rsp["resMsg"]["totals"]);
                                vueMain.tableDataSoe = rsp["resMsg"]["data"];
                            }
                            else {
                                Notiflix.Notify.warning("获取SOE信息列表数据失败：" + rsp["resMsg"]);
                                vueMain.tableDataSoe = [];
                                vueMain.totalSoes = 0;
                            }
                        },
                        error: function (rsp) {
                            vueMain.tableDataSoe = [];
                            vueMain.totalSoes = 0;
                            Notiflix.Notify.failure("获取SOE信息列表数据异常");
                        }
                    });
                },
                getList() {
                    this.loading = true;
                    let request = {};
                    request.cmdType = "GET_FAULT_LIST";
                    request.dateStart = this.timeVal[0];
                    request.dateEnd = this.timeVal[1];
                    request.faultType = 'F';
                    request.pageIndex = this.currentPage;
                    request.pageSize = this.pageSize;
                    vueMain = this;
                    $.ajax({
                        url: g_CenterHttpUrl,
                        contentType: 'application/json',
                        data: JSON.stringify(request),
                        async: true,
                        type: "post",
                        dataType: "json",
                        success: function (rsp) {
                            if (rsp["resCode"] == g_ResCodeSuccess) {
                                vueMain.totals = parseInt(rsp["resMsg"]["totals"]);
                                vueMain.tableData = rsp["resMsg"]["data"];
                            }
                            else {
                                Notiflix.Notify.warning("获取故障信息列表数据失败：" + rsp["resMsg"]);
                                vueMain.tableData = [];
                                vueMain.totals = 0;
                            }
                        },
                        error: function (rsp) {
                            vueMain.tableData = [];
                            vueMain.totals = 0;
                            Notiflix.Notify.failure("获取故障信息列表数据异常");
                        }
                    });
                },
                formatTime(row, column) {
                    let date = row[column.property];
                    if (date) {
                        let dateF = new Date(date);
                        return dateF.Format("yyyy-MM-dd hh:mm:ss")
                    }
                }
            },

            mounted() {
                this.dateStart = this.getTimes()[0];
                this.dateEnd = this.getTimes()[1];
                this.getList();
            }
        }

        // 获取故障数据
        function GetErrMsgShowPoint() {
            let request = {};
            let requestParam = {
                "cmdType": "GET_ERROR_PAGE_CONFIG",
                "pageID": g_PageID_Fault
            };
            $.ajax({
                async: false,
                data: JSON.stringify(requestParam),
                dataType: "json",
                type: "POST",
                url: g_CenterHttpUrl,

                success: function (rsp) {
                    if (rsp["resCode"] == g_ResCodeSuccess) {
                        errMsg = JSON.parse(rsp["resMsg"]);
                        AddGroups(errMsg.Group);
                        AddNodes(errMsg.Node);
                        PreRefresh();
                    }
                },

                error: function (rsp) {
                }
            });
        }
        // 设置颜色
        function SetColor(iKey, strColor) {
            let nodeData = myDiagram.model.findNodeDataForKey(iKey);
            if (nodeData != null) {
                // myDiagram.model.setDataProperty(nodeData, 'color', 'black');
                myDiagram.model.setDataProperty(nodeData, 'fill', strColor);
            }
        }

        // 刷新数据
        function RefreshViewData(jsData) {
            arrRed = [];
            for (let itemJS of jsData) {
                if (itemJS.C == "green") {
                    // 绿色故障点，正常显示
                    SetColor(parseInt(itemJS.I), itemJS.C);
                }
                else {
                    // 红色故障点，缓存起来，在定时函数中刷新（闪烁）
                    arrRed[itemJS.I] = itemJS.C;
                }
            }
        }

        // 预刷新
        function PreRefresh() {
            let strData = localStorage.getItem("faultGOJS");
            if (strData != null) {
                RefreshViewData(JSON.parse(strData));
            }
        }

        // 故障点闪烁
        function FaultNodeFlash() {
            for (let item in arrRed) {
                SetColor(parseInt(item), bShowRed ? arrRed[item] : "grey");
            }

            bShowRed = !bShowRed;
        }

        //单控
        function OnClickDK(actionName, btnValue) {
            if (actionName == null || actionName == ""){
                Notiflix.Notify.init();
                Notiflix.Notify.warning('该动作名称为空');
            }
            DKSubmit(actionName, btnValue);
            // $.confirm({
            //     theme: 'Material',
            //     type: 'blue',
            //     title: btnValue + ' 操作',
            //     content: '确定执行 ' + btnValue + ' 的操作吗？',
            //     buttons: {
            //         执行: {
            //             btnClass: 'btn-blue',
            //             action: function () {
            //                 DKSubmit(actionName, btnValue);
            //             }
            //         },

            //         取消: {
            //             btnClass: 'btn-orange'
            //         }
            //     }
            // });
        }

        //单控提交
        function DKSubmit(actionName, btnValue) {
            Notiflix.Notify.init();
            let request = {};
            request.cmdType = "DK_CMD";
            request.action = actionName;
            request.actName = btnValue;
            $.ajax({
                url: g_CenterHttpUrl,
                contentType: 'application/json',
                data: JSON.stringify(request),
                async: true,
                type: "post",
                dataType: "json",
                success: function (rsp) {
                    if (rsp["resCode"] == g_ResCodeSuccess) {
                        Notiflix.Notify.success(btnValue + ' 操作执行成功');
                    }
                    else {
                        Notiflix.Notify.failure(btnValue + " 操作执行失败。" + rsp["resMsg"]);
                    }
                },
                error: function (rsp) {
                    Notiflix.Notify.warning(btnValue + ' 操作执行异常');
                }
            });
        }

        setInterval(function () {
            if ((arrRed != null) && (arrRed.length > 0)) {
                FaultNodeFlash();
            }
        }, 350);

        // 获取下一天
        function getNextDay(d) {
            d = new Date(d);
            d = +d + 1000 * 60 * 60 * 24;
            d = new Date(d);
            return d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate();
        }

        Date.prototype.Format = function (fmt) { //author: meizz
            var o = {
                "M+": this.getMonth() + 1, //月份
                "d+": this.getDate(), //日
                "h+": this.getHours(), //小时
                "m+": this.getMinutes(), //分
                "s+": this.getSeconds(), //秒
                "q+": Math.floor((this.getMonth() + 3) / 3), //季度
                "S": this.getMilliseconds() //毫秒
            };
            if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
            for (var k in o)
                if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
            return fmt;
        }

        // 点击按钮
        // ======================================================
        // 大车前进
        function OnClickDCForward(){
            let url = "faultFlow.html?flowID=DCUpFlow&pageID=" + g_PageID_DCForward;
            layer.open({
                type: 2,
                title: '大车前进流程',
                maxmin: true,
                shadeClose: true, //点击遮罩关闭层
                area: ['1200px', '620px'],
                content: url
            });
        }

        // 大车后退
        function OnClickDCBack(){
            let url = "faultFlow.html?flowID=DCDownFlow&pageID=" + g_PageID_DCBack;
            layer.open({
                type: 2,
                title: '大车后退流程',
                maxmin: true,
                shadeClose: true, //点击遮罩关闭层
                area: ['1200px', '620px'],
                content: url
            });
        }

        // 悬臂左转
        function OnClickXBLeft(){
            let url = "faultFlow.html?flowID=XBLeftFlow&pageID=" + g_PageID_XBLeft;
            layer.open({
                type: 2,
                title: '悬臂左转流程',
                maxmin: true,
                shadeClose: true, //点击遮罩关闭层
                area: ['1200px', '620px'],
                content: url
            });
        }

        // 悬臂右转
        function OnClickXBRight(){
            let url = "faultFlow.html?flowID=XBRightFlow&pageID=" + g_PageID_XBRight;
            layer.open({
                type: 2,
                title: '悬臂右转流程',
                maxmin: true,
                shadeClose: true, //点击遮罩关闭层
                area: ['1200px', '620px'],
                content: url
            });
        }

        // 悬臂上仰
        function OnClickXBUp(){
            let url = "faultFlow.html?flowID=XBUpFlow&pageID=" + g_PageID_XBUp;
            layer.open({
                type: 2,
                title: '悬臂上仰流程',
                maxmin: true,
                shadeClose: true, //点击遮罩关闭层
                area: ['1200px', '620px'],
                content: url
            });
        }

        // 悬臂下俯
        function OnClickXBDown(){
            let url = "faultFlow.html?flowID=XBDownFlow&pageID=" + g_PageID_XBDown;
            layer.open({
                type: 2,
                title: '悬臂下俯流程',
                maxmin: true,
                shadeClose: true, //点击遮罩关闭层
                area: ['1200px', '620px'],
                content: url
            });
        }

        // 悬臂皮带堆料
        function OnClickXBPDDL(){
            let url = "faultFlow.html?flowID=DL_XBPDFlow&pageID=" + g_PageID_XBPDDL;
            layer.open({
                type: 2,
                title: '悬臂皮带堆料流程',
                maxmin: true,
                shadeClose: true, //点击遮罩关闭层
                area: ['1200px', '620px'],
                content: url
            });
        }

        // 悬臂皮带取料
        function OnClickXBPDQL(){
            let url = "faultFlow.html?flowID=QL_XBPDFlow&pageID=" + g_PageID_XBPDQL;
            layer.open({
                type: 2,
                title: '悬臂皮带取料流程',
                maxmin: true,
                shadeClose: true, //点击遮罩关闭层
                area: ['1200px', '620px'],
                content: url
            });
        }

        // 斗轮启动
        function OnClickDLStart(){
            let url = "faultFlow.html?flowID=DLFlow&pageID=" + g_PageID_DLStart;
            layer.open({
                type: 2,
                title: '斗轮启动流程',
                maxmin: true,
                shadeClose: true, //点击遮罩关闭层
                area: ['1200px', '620px'],
                content: url
            });
        }

        // 轮斗翻板堆料
        function OnClickDLCDL(){
            let url = "faultFlow.html?flowID=DL_DLCFlow&pageID=" + g_PageID_DLCDL;
            layer.open({
                type: 2,
                title: '轮斗翻板堆料流程',
                maxmin: true,
                shadeClose: true,
                area: ['1200px', '620px'],
                content: url
            });
        }

        // 轮斗翻板取料
        function OnClickDLCQL(){
            let url = "faultFlow.html?flowID=QL_DLCFlow&pageID=" + g_PageID_DLCQL;
            layer.open({
                type: 2,
                title: '轮斗翻板取料流程',
                maxmin: true,
                shadeClose: true,
                area: ['1200px', '620px'],
                content: url
            });
        }

        // 中心料斗堆料
        function OnClickZBFBDL(){
            let url = "faultFlow.html?flowID=DL_ZBFBFlow&pageID=" + g_PageID_ZBFBDL;
            layer.open({
                type: 2,
                title: '中心料斗堆料流程',
                maxmin: true,
                shadeClose: true,
                area: ['1200px', '620px'],
                content: url
            });
        }

        // 中心料斗取料
        function OnClickZBFBQL(){
            let url = "faultFlow.html?flowID=QL_ZBFBFlow&pageID=" + g_PageID_ZBFBQL;
            layer.open({
                type: 2,
                title: '中心料斗取料流程',
                maxmin: true,
                shadeClose: true,
                area: ['1200px', '620px'],
                content: url
            });
        }
        // ======================================================

        // 接收故障详情页面数据
        function OnReceiveFaultPage(data){
            if ((data != null) && (data != "")) {
                let jsdata = JSON.parse(data);
                arrGOJSData = jsdata.GOJS;
                if(arrGOJSData != undefined){
                    UpdateData(jsdata.GOJS);
                    RefreshViewData(jsdata.GOJS);
                }
            }
        }

        window.onload = function(){
            let Component = Vue.extend(Main);
            new Component().$mount('#app');
            InitGoJs();
            GetErrMsgShowPoint();

            // WebSocket：故障详情页面
            let faultDetailMessage = "pid=" + g_PageID_Fault;
            faultWS = new NeptWebSocket(
                g_CenterServerIp,
                g_CenterWebSocketPort,
                g_WebSocketMaxReconnectInterval,
                OnReceiveFaultPage,
                faultDetailMessage
            );
            faultWS.tryCreate();
        }

        window.onunload = function(){
            if (faultWS != null){
                faultWS.Close();
            }
            // 缓存页面GOJS数据
            if ((arrGOJSData != null) && (arrGOJSData.length > 0)) {
                localStorage.setItem("faultGOJS", JSON.stringify(arrGOJSData));
            }
        }
    </script>
</body>

</html>